package com.justech.eat;

import com.justech.eat.entity.Order;
import com.justech.eat.mapper.sqlserver.AccMonitorLogMapper;
import com.justech.eat.repository.OrderRepository;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.List;

@EntityScan(value = "com.justech.eat.entity")
@SpringBootApplication
@EnableTransactionManagement
public class EatApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(EatApplication.class, args);
        /*AccMonitorLogMapper contextBean = applicationContext.getBean(AccMonitorLogMapper.class);
        System.out.println(contextBean.version());
        OrderRepository orderRepository = applicationContext.getBean(OrderRepository.class);
        List<Order> all = orderRepository.findAll();
        System.out.println(all);*/

    }

}
